package com.yunhe.option.service.base;

import com.yunhe.option.domain.base.ProtectionEquipmentStatus;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.exception.UniqueConstraintsException;
import org.springframework.transaction.annotation.Transactional;

/**
 * 环保设备运行情况Service
 * @desc 环保设备运行情况服务类定义
 * @author anmeiyi
 */
public interface ProtectionEquipmentStatusService {

    /**
     * 新增环保设备运行情况
     * @param protectionEquipmentStatus 环保设备运行情况
     */
    @Transactional
    ProtectionEquipmentStatus createProtectionEquipmentStatus(ProtectionEquipmentStatus protectionEquipmentStatus)
            throws ArgumentErrorException, UniqueConstraintsException;

    /**
     * 删除环保设备运行情况
     * @param protectionEquipmentStatusId 环保设备运行情况Id
     */
    @Transactional
    void deleteProtectionEquipmentStatus(Long protectionEquipmentStatusId);

    /**
     * 更新环保设备运行情况（更新全部字段）
     * @param protectionEquipmentStatus 环保设备运行情况
     */
    @Transactional
    ProtectionEquipmentStatus updateProtectionEquipmentStatus(ProtectionEquipmentStatus protectionEquipmentStatus)
            throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    /**
     * 更新环保设备运行情况（更新指定字段）
     * @param protectionEquipmentStatusId
     * @param code
     * @param name
     * @param title
     * @param sn
     * @param activity
     */
    @Transactional
    ProtectionEquipmentStatus updateProtectionEquipmentStatus(Long protectionEquipmentStatusId,
                                            Long code,
                                            String name,
                                            String title,
                                            Long sn,
                                            Boolean activity)
            throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    /**
     *获得全部环保设备运行情况对象
     */
    @Transactional
    Iterable<ProtectionEquipmentStatus> findIndustryCategories();
}
